<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title></title>
    [#include "/admin/include/admin_static.htm"]
    [#import "/admin/include/admin_pagination.ftl" as p/]
    <script>
        $(function() {
            $("#query").click(function() {
                $("#searchForm").attr("action","${path}/admin/recharge/list.aspx").submit();
            })

            $("#export").click(function() {
                $("#searchForm").attr("action","${path}/admin/recharge/exportRechargeList.aspx").submit();
            })
        });
    </script>
</head>
<body>
<div class="main_admin_content">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>充值记录列表</legend>
    </fieldset>
    <form id="searchForm" method="post" action="${path}/admin/recharge/list.aspx">
        <table class="search_table_div">
            <tr>
                <td class="column">充值方式：</td>
                <td>
                [@u.select listKey="dict_value"  headerKey="" headerValue="全部类型" listValue="dict_lab" headerButtom="false" list=DictionaryUtils.getDictListNid('recharge_methods')
                name="rechargeType" value="${(rechargeType)!''}" /]
                </td>
                <td class="column">充值金额：</td>
                <td><input type="text" onkeyup="value=value.replace(/[^(\d)]/g,'')" name="money" value="${money }" /></td>
                <td class="column">用户名：</td>
                <td><input type="text" name="userName" value="${userName }" /></td>
                <td class="column">订单号：</td>
                <td><input type="text" name="trade_no" value="${trade_no }" /></td>
                <td class="column">状态：</td>
                <td colspan="7">
                [@u.select list={"":"全部","0":"未付款","1":"充值成功","-1":"充值失败"}
                name="status" value="${(status)!''}" /]
                </td>
                <td class="column">日期：</td>
                <td>
                    <input type="text" onclick="WdatePicker();" value="${begin_date }"
                           name="begin_date" class="short" readonly="readonly" />
                    <i>至</i>
                    <input type="text" onclick="WdatePicker();" value="${end_date }"
                           name="end_date" class="short" readonly="readonly" />
                </td>
            </tr>
            <tr>
                <th colspan="100" class="btn_td">
                    <input id="export" type="button" class="layui-btn" value="导出">
                    <input id="query" type="button" class="layui-btn" value="查询"/>
                    <input onclick="resent();" type="button" class="layui-btn" value="清空"/>
                </th>
            </tr>
        </table>
    </form>
    <table class="layui-table">
        <colgroup>
            <col width="50">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
        </colgroup>
        <thead>
        <tr>
            <th>充值类型</th>
            <th>支付方式</th>
            <th>用户ID</th>
            <th>用户名称</th>
            <th>真实姓名</th>
            <th>订单号</th>
            <th>充值金额</th>
            <th>到账金额</th>
            <th>充值时间</th>
            <th>充值状态</th>
            <th>备注</th>
            <th>审核人</th>
            <th>审核时间</th>
        </tr>
        </thead>
            [#list recharges as recharge]

            <tr>
                <td>
                 ${p2p_get_dict("recharge_methods",recharge.type )}
                </td>
                <td>${recharge.ap_name}</td>
                <td>${recharge.user_id}</td>
                <td>
                    ${recharge.u_user_name}
                </td>
                <td>${recharge.ra_real_name}</td>
                <td>${recharge.trade_no}</td>
                <td>￥${recharge.money}</td>

                <td>￥${recharge.amount}</td>
                <td>
                ${p2p_date_format(recharge.addtime ,"yyyy-MM-dd HH:mm:ss")}
                </td>
                <td>
                    [#if recharge.status==0]
                        [#if recharge.ap_style==0]
                            <input type="button" value="审核" onclick="window.location.href='${path}/admin/recharge/${recharge.id}.aspx'" class="layui-btn " />
                        [#else]
                            未付款
                        [/#if]
                    [#elseif recharge.status==1 ]
                        充值成功
                    [#else]
                    充值失败
                    [/#if]
                </td>
                <td>
                    [#if recharge.remark?? && !recharge.remark?contains("银行")]
                        ${recharge.remark}
                    [#elseif recharge.remark?? && recharge.remark?contains("银行")]
                        ${recharge.remark?substring(0,15)+"..."}
                    [/#if]
                </td>
                <td>
                    ${recharge.emp_name }
                </td>
                <td>
                    ${p2p_date_format(recharge.verify_time,"yyyy-MM-dd HH:mm:ss") }
                </td>
            </tr>
[/#list]

    </table>
    [@p.pager pager = page parameterMap={"rechargeType":"${rechargeType}","trade_no":"${trade_no}","status":"${status}","money":"${money }","userName":"${userName }","begin_date":"${begin_date }","end_date":"${end_date }"}   url = "${path}/admin/recharge/list.aspx"/]
</div>
</body>
</html>